<?php

// Namespace

namespace Loop;


/**
 * CHelpManager is a class that handles management of help sections
 */

class CHelpManager
{
	// Properties
	
	private $sections = array();
	
	
	/**
	 * Adds a section into the help manager
	 *
	 * @param 	string 	$sectionName 		The name of the section
	 * @param 	array 	$sectionOptions 	The array of the section's options
	 */
	 
	 public function addSection($sectionName, $sectionOptions)
	 {
		// Make sure we have the right arguments

		if 
		(
			empty($sectionName) == true && 
			empty($sectionOptions) == true
		)
		{
			return;
		}

		
		// Define the default section options

		$defaultSectionOptions = array
		(
			'classOfIcon' => null
		);


		// Make sure that the given section options are valid

		$sectionOptions = array_merge($defaultSectionOptions, $sectionOptions);


		// Store the section

		$this->sections[$sectionName] = $sectionOptions;
	 }
	 
	 
	/**
	 * Returns the array of sections
	 *
	 * @return  array 	An array which contains the sections
	 */
	  
	public function getSections()
	{
		return $this->sections;
	}	

}

?>
